<template>
  <div id="app">
    <h1>我是父组件子组件传递过来的数据是：{{ count }}</h1>
    <son @changeCount="changeCount"></son>
  </div>
</template>
<script>
import son from "@/components/son.vue";

export default {
  name: "App",
  data() {
    return {
      count: 0,
    }
  },
  methods: {
    changeCount(value) {
      this.count = value
    }
  },
  components: {
    son,
  }
}
</script>
<style lang="less">
#app {
  background-color: chocolate;
}
</style>
